package Test;

import dao.heroDao;
import entity.hero;
import org.apache.ibatis.session.SqlSession;
import com.baizhi.service.heroService;
import com.baizhi.service.service.impl.PageService;
import util.MyBatisUtils;
import util.PageBean;

import java.util.List;

public class heroDaos {
    public static void main(String[] args) {
        SqlSession sqlSession = MyBatisUtils.openSession();
        heroDao mapper = sqlSession.getMapper(heroDao.class);
        int list = mapper.countHero("v");
        List<hero> list1 = mapper.findList(1, 5,"v");
        System.out.println(list1);
       // System.out.println(list);
    }
}
class heroServices{
    public static void main(String[] args) {
        heroService a=new PageService();
        PageBean<hero> bean = a.find(new PageBean<hero>(),"v");
        System.out.println(bean);
    }
}
